home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The CDPD Public Domain Collection for CDTV 4
/
CDPD_IV.bin
/
e
/
mailinglists
/
amigae.0294feb.archive
/
000033_donews!crash!ic….com!THORNTONJ_Tue, 8 Feb 94 07:54:01 PST.msg
< prev
next >
Wrap
Internet Message Format
|
1994-05-26
|
6KB
Received: by bkhouse.cts.com (V1.17-beta/Amiga)
id <1rp7@bkhouse.cts.com>; Tue, 8 Feb 94 07:54:01 PST
Received: from crash by donews.cts.com with uucp
(Smail3.1.28.1 #18) id m0pTkZg-0001qKC; Tue, 8 Feb 94 00:01 EST
Received: from beast.cs.hh.ab.com by crash.cts.com with smtp
(Smail3.1.28.1 #18) id m0pTk85-0000iXC; Mon, 7 Feb 94 20:32 PST
Date: Mon, 7 Feb 1994 23:32:36 -0500 (EST)
Message-Id: <940207233236.2041eb4a@iccgcc.cs.hh.ab.com>
From: THORNTONJ@iccgcc.cs.hh.ab.com
To: AMIGAE@BKHOUSE.CTS.COM
Subject: FANTASY ADVENTURE ENGINE
Here is my program. The data strings should work as is but the Line and
Box functions in the drawmap() proc should be put back into one statement
I think. I broke them down so that they would mail better.
Don't forget to cut this out
Please let me know if you can find what's wrong with it.
Thanks in advance
jessie
thorntonj@beast.cs.hh.ab.com
---8<-------8<------8<------cut here -----8<-----8<------8<------8<---
/* Fantasy Adventure Engine in E */
OPT OSVERSION=37
MODULE 'intuition/screens'
ENUM OKAY,NOSCREEN,NOSIG
DEF vwalls[86]:STRING, hwalls[86]:STRING, vdoors[86]:STRING, hdoors[86]:STRING,
command[80]:STRING, ccon, oldstd, mapcon, statcon, miscon, myscrn=NIL,
sig=-1, name, temp, row, col
PROC main()
/* this is information for the map later to be read in out of a file */
/* originally these were one line each but broke them up to mail out */
vwalls := '65534000000001457854000000012600000004485069400000'+
'9600000000179200000000006553400000'
hwalls := '00000327670000032516000310000000903000240307200903'+
'0000038400000000007319920076832767'
hdoors := '00000000000000000004000010000000000000000102400002'+
'0000000000000000000021760051200000'
vdoors := '00000000000000832776000000002400000000640000400000'+
'0000000000000000000000000038400000'
command := 'test'
row := 16
col := 8
openmyscreen()
openwindows()
oldstd := SetStdOut(miscon)
WriteF('This is my first program in E!\n')
WriteF('Enter Quit to stop program\n')
WHILE StrCmp(command,'QUIT',ALL)=FALSE
drawmap()
printstatus()
temp := SetStdOut(ccon)
WriteF('COMMAND>')
ReadStr(ccon,command)
WriteF('\n')
UpperStr(command)
docommand()
ENDWHILE
closewindows()
closemyscreen()
ENDPROC
PROC printstatus()
temp := SetStdOut(statcon)
WriteF('This is where the characters stats wil be printed\n')
WriteF('This is where the general info will be\n')
WriteF('This will be info about the game\n')
temp := SetStdOut(ccon)
ENDPROC
PROC openmyscreen()
IF (myscrn:=OpenScreenTagList(0,
[SA_DEPTH,4,
SA_DISPLAYID,$8004,
SA_PUBNAME,name:='FAE',
SA_PENS,0,
SA_TITLE,name,
SA_PUBSIG,IF (sig:=AllocSignal(-1))=NIL THEN Raise(NOSIG) ELSE sig,
SA_PUBTASK,NIL,
0,0]))=NIL THEN Raise(NOSCREEN)
PubScreenStatus(myscrn,0)
SetDefaultPubScreen(name)
SetPubScreenModes(SHANGHAI)
ENDPROC
PROC closemyscreen()
CloseS(myscrn)
ENDPROC
PROC openwindows()
IF mapcon:=OpenW(1,1,190,185,$200,$F,'Map',NIL,1,NIL)
ENDIF
IF statcon:=Open('con:190/1/450/55/Status',NEWFILE)
ENDIF
IF miscon:=Open('con:190/55/450/131/Misc',NEWFILE)
ENDIF
IF ccon:=Open('con:1/185/640/215/Commands',NEWFILE)
ENDIF
ENDPROC
PROC docommand()
IF command := '8'
row:=row-1 /* this is my original line */
/* also tried; row-- */
ENDIF
ENDPROC
PROC closewindows()
Close(ccon)
CloseW(mapcon)
Close(statcon)
Close(miscon)
ENDPROC
PROC drawmap()
/* draw map and position character icon */
DEF i, ii, vbase, hbase, verwal[6]:STRING, horwal[5]:STRING,
verdor[5]:STRING, hordor[5]:STRING, nvwal, nhwal, nvdor, nhdor
vbase := 15
hbase := 7
FOR i:= 1 TO 17
MidStr(verwal,vwalls,(i-1)*5,5)
MidStr(horwal,hwalls,(i-1)*5,5)
MidStr(verdor,vdoors,(i-1)*5,5)
MidStr(hordor,hdoors,(i-1)*5,5)
nvwal:=Val(verwal,NIL)
nhwal:=Val(horwal,NIL)
nvdor:=Val(verdor,NIL)
nhdor:=Val(hordor,NIL)
FOR ii := 1 TO 16
/* these Line commands were one line, broke them up for mailing */
IF nvwal AND Shl(1,ii-1)
Line(hbase+((ii-1)*10),vbase+((i-1)*10),
(hbase+10)+((ii-1)*10),vbase+((i-1)*10),2)
ENDIF
IF nhwal AND Shl(1,ii-1)
Line(hbase+((i-1)*10),vbase+((ii-1)*10),
hbase+((i-1)*10),(vbase+10)+((ii-1)*10),2)
ENDIF
IF nvdor AND Shl(1,ii-1)
Box(hbase+3+((ii-1)*10),(vbase-1)+((i-1)*10),
hbase+7+((ii-1)*10),(vbase+1)+((i-1)*10),3)
ENDIF
IF nhdor AND Shl(1,ii-1)
Box((hbase-1)+((i-1)*10),vbase+3+((ii-1)*10),
(hbase+1)+((i-1)*10),vbase+7+((ii-1)*10),3)
ENDIF
ENDFOR
ENDFOR
Box(hbase+((col-1)*10)+4,vbase+((row-1)*10)+2,
hbase+((col-1)*10)+5,vbase+((row-1)*10)+5,1)
Line(hbase+((col-1)*10)+3,vbase+((row-1)*10)+4,
hbase+((col-1)*10)+6,vbase+((row-1)*10)+4,1)
Line(hbase+((col-1)*10)+2,vbase+((row-1)*10)+2,
hbase+((col-1)*10)+2,vbase+((row-1)*10)+3,1)
Line(hbase+((col-1)*10)+7,vbase+((row-1)*10)+2,
hbase+((col-1)*10)+7,vbase+((row-1)*10)+3,1)
Line(hbase+((col-1)*10)+3,vbase+((row-1)*10)+6,
hbase+((col-1)*10)+3,vbase+((row-1)*10)+6,1)
Line(hbase+((col-1)*10)+6,vbase+((row-1)*10)+6,
hbase+((col-1)*10)+6,vbase+((row-1)*10)+6,1)
Line(hbase+((col-1)*10)+2,vbase+((row-1)*10)+7,
hbase+((col-1)*10)+3,vbase+((row-1)*10)+7,1)
Line(hbase+((col-1)*10)+6,vbase+((row-1)*10)+7,
hbase+((col-1)*10)+7,vbase+((row-1)*10)+7,1)
ENDPROC